import request from '@/config/axios'
/**
 * 分页查询食谱
 */
export const query = (params) => {
  return request.get({ url: '/restaurant/recipe/query', params })
}

/**
 * 新建食谱
 */
export const create = (data) => {
  return request.post({ url: '/restaurant/recipe/create', data })
}

/**
 * 更新食谱
 */
export const update = (data) => {
  return request.put({ url: '/restaurant/recipe/update', data })
}

/**
 * 删除食谱
 */
export const deleted = (id) => {
  return request.delete({ url: '/restaurant/recipe/deleted?id=' + id })
}

/**
 * 获取单个食谱
 */
export const get = (id) => {
  return request.get({ url: '/restaurant/recipe/get?id=' + id })
}

/**
 * 查询套餐
 */
export const comboQuery = (params) => {
  return request.get({ url: '/restaurant/recipe/combo-query', params })
}

/**
 * 创建套餐
 */
export const comboCreate = (data) => {
  return request.post({ url: '/restaurant/recipe/combo-create', data })
}

/**
 * 更新套餐
 */
export const comboUpdate = (data) => {
  return request.put({ url: '/restaurant/recipe/combo-update', data })
}

/**
 * 删除套餐
 */
export const comboDeleted = (id) => {
  return request.delete({ url: '/restaurant/recipe/combo-deleted?id=' + id })
}

/**
 * 获取单个套餐
 */
export const comboGet = (id) => {
  return request.get({ url: '/restaurant/recipe/combo-get?id=' + id })
}

/**
 * 查询餐饮套餐
 */
export const listQueryCombo = () => {
  return request.get({ url: '/restaurant/recipe/list-query-combo' })
}

/**
 * 分页查询食谱详情
 */
export const pageQueryDetail = (params) => {
  return request.get({ url: '/restaurant/recipe/page-query-detail', params })
}
